home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls011.1.Z / tls011.1 / usr / lib / mkdev / mmdf
Encoding:
Text File  |  1991-10-25  |  31.4 KB  |  1,324 lines

  1. :
  2. # @(#) cfg.sh 1.8 91/10/22 SCOCAN
  3. #
  4. #    Copyright (C) 1990-1991 The Santa Cruz Operation, Inc.
  5. #        All Rights Reserved.
  6. #    The information in this file is provided for the exclusive use of
  7. #    the licensees of The Santa Cruz Operation, Inc.  Such users have the
  8. #    right to use, modify, and incorporate this code into other products
  9. #    for purposes authorized by the license agreement provided they include
  10. #    this notice and the associated copyright notice with any such product.
  11. #    The information in this file is provided "AS IS" without warranty.
  12. #    /usr/lib/mkdev/mmdf: Configure MMDF
  13.  
  14. #
  15. # Some useful variables
  16. #
  17. PATH=/bin:/usr/bin:/usr/mmdf/bin
  18. HOST=host            # location of program to query nameserver
  19. HOSTPART='\([^.]*\)\..*'    # regexp for host part of FQDN
  20. DOMAINPART='[^.]*\.\(.*\)'    # regexp for domain part of FQDN
  21. #
  22. # names of things
  23. #
  24. locmachine=""
  25. locdomain=""
  26. locname=""
  27. myname=""
  28. mydomain=""
  29. myFQDN=""
  30. uuname=""
  31. postmasteralias=""
  32. badhostname=""
  33. badhostchannel=""
  34. badhosttable=""
  35. badhostconf=""
  36. badusername=""
  37. baduserchannel=""
  38. badusertable=""
  39. baduserconf=""
  40. #
  41. # Configuration options
  42. #
  43. havesmtp=no
  44. havemicnet=no
  45. haveuucp=no
  46. havebadhost=no
  47. havebaduser=no
  48. usenameserver=no
  49. qnameserver=no
  50. generatedDomainLine=no
  51. #
  52. # Files
  53. #
  54. TAILORFILE=mmdftailor
  55. TABLEDIR=table
  56. AUSER=alias.user
  57. ALIAS=alias.ali
  58. LALIAS=alias.list
  59. LOCAL=local.chn
  60. LOCDOM=local.dom
  61. SMTPCHN=smtp.chn
  62. DOMAINDOM=domain.dom
  63. MNCHN=micnet.chn
  64. MNDOM=micnet.dom
  65. UUCHN=uucp.chn
  66. UUDOM=uucp.dom
  67. LIST=list.chn
  68. ROOTDOM=root.dom
  69. UUHOSTS=/tmp/mm$$.uuh
  70. SMTPHOSTS=/tmp/mm$$.smh
  71. MICHOSTS=/tmp/mm$$.mih
  72. ALLHOSTS="$UUHOSTS $SMTPHOSTS $MICHOSTS"
  73. SPOOLDIR=/usr/spool/mmdf
  74.  
  75. cleanup() {
  76.     rm -f /tmp/mm$$*
  77.     exit $1
  78. }
  79.  
  80. trap 'cleanup 0' 0
  81. trap 'cleanup 1' 1 2 3 15 19
  82.  
  83. #
  84. # Some useful functions
  85. #
  86. lowerize() {
  87.     echo "$*" | tr '[A-Z]' '[a-z]'
  88. }
  89.  
  90. requireConfig() {
  91.     echo "$1 must be configured before mail"
  92.     cleanup 0
  93. }
  94.  
  95. makeDirectory() {
  96.     case $TESTCONFIG in
  97.     yes)    return 0
  98.         ;;
  99.     esac
  100.  
  101.     for dir
  102.     do
  103.         test -d "$dir" || mkdir -p "$dir"
  104.     done
  105. }
  106.  
  107. saveFile() {
  108.     if [ -f "$1" -a ! -f "$1-" ]
  109.     then
  110.         cp "$1" "$1-"
  111.     fi
  112. }
  113.  
  114.  
  115. getDefault() {
  116.     read value
  117.  
  118.     case "$value" in
  119.     "")    echo "$1"
  120.         ;;
  121.     *)    echo "$value"
  122.         ;;
  123.     esac
  124. }
  125.  
  126. getyn() {
  127.     until
  128.         echo "$1? [$2] \c"
  129.         yes=`getDefault "$2"`
  130.         case "$yes" in
  131.         [yYnN]*)    true
  132.                 ;;
  133.         *)        false
  134.                 ;;
  135.         esac
  136.     do
  137.         echo "Please answer yes or no.\n" >&2
  138.     done
  139.  
  140.     case "$yes" in
  141.     [yY]*)    true
  142.         ;;
  143.     *)    false
  144.         ;;
  145.     esac
  146. }
  147.  
  148. getFQDN() {
  149.     # getFQDN host returns fully qualified domain name
  150.  
  151.     hostname="$1"
  152.     if [ "$usenameserver" = yes -o "$qnameserver" = yes ] &&
  153.          set -- `$HOST $hostname 2>/dev/null`
  154.     then
  155.         echo $1
  156.     else
  157.         case "$hostname" in
  158.         *.*)    echo "$hostname"
  159.             ;;
  160.         *)    awk "\$1 == \"$hostname\" {print \$2}" $ALLHOSTS
  161.             ;;
  162.         esac
  163.     fi
  164. }
  165.  
  166.  
  167. getDomainNames() {
  168.     # getDomainNames protocol hostfile [default domain]
  169.     case $# in
  170.     3)    defaultDomain=".$3"
  171.         ;;
  172.     *)    defaultDomain=""
  173.         ;;
  174.     esac
  175.  
  176.     until
  177.         until
  178.             echo "\nEnter the $1 site name (blank to terminate): \c"
  179.             read shortname
  180.             [ "$shortname" = "" ] ||
  181.                 grep -s "^$shortname$" $2 >/dev/null 2>&1
  182.         do
  183.             if grep -s "$shortname" $2 >/dev/null 2>&1
  184.             then
  185.                 echo "You have already specified a domain name for that host." >&2
  186.             else
  187.                 echo "You do not use $1 to talk to that host!" >&2
  188.             fi
  189.         done
  190.         [ "$shortname" = "" ]
  191.     do
  192.         echo "What is $shortname's fully qualified name? [$shortname$defaultDomain] \c"
  193.         longname="`getDefault $shortname$defaultDomain"
  194.         longname="`lowerize $longname`"
  195.  
  196.         ed - $2 <<-END_OF_SCRIPT
  197.             /^$shortname$/s//& $longname/
  198.             w
  199.             q
  200.         END_OF_SCRIPT
  201.         if grep -v -s ' ' $2 >/dev/null 2>&1
  202.         then
  203.             : some still to go
  204.         else
  205.             echo "Done with $1."
  206.             break
  207.         fi
  208.     done
  209. }
  210.  
  211. generateDefaultDomains() {
  212.     # generateDefaultDomains file default domain
  213.  
  214.     case $2 in
  215.     .*|"")    defaultDomain="$2" # it is ok already
  216.         ;;
  217.     *)    defaultDomain=".$2"
  218.         ;;
  219.     esac
  220.     defaultDomain="`lowerize $defaultDomain`"
  221.  
  222.     ed - $1 <<-END_OF_SCRIPT
  223.         g/^uunet$/s//& &.uu.net/
  224.         v/ /s/.*/& &$defaultDomain/
  225.         w
  226.         q
  227.     END_OF_SCRIPT
  228. }
  229.  
  230.  
  231. buildSMTPfromNS () {
  232.     for i in mx a cname; do
  233.         $HOST -t $i -l $mydomain
  234.     done | sed -n    -e '/127.0.0.1$/d' \
  235.             -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' \
  236.             -e '/has address/s/\([^.]*\)\([^ ]*\).*/\1 \1\2/p' \
  237.             -e '/nickname/s/\..* is a nickname for / /p' \
  238.             -e '/handled by/s/\([^.]*\)\([^ ]*\).*handled by \(.*\)/\1 \1\2 \3/p'
  239. }                        
  240. #
  241. # MAIN MAIN MAIN MAIN MAIN MAIN
  242. #
  243.  
  244. # Check out the situation
  245. set -- `id`
  246. user=`expr $1 : '.*(\(.*\))'`
  247. group=`expr $2 : '.*(\(.*\))'`
  248.  
  249. case $user in
  250. mmdf)    case `pwd` in
  251.     /usr/mmdf)
  252.         : feeling groovy
  253.         ;;
  254.     *)    more <<\HERE
  255. The configuration generated will not be installed to be run by
  256. default, because the script is not being run in the mmdf
  257. configuration directory.
  258.  
  259. HERE
  260.         if getyn 'Do you wish to continue' n
  261.         then
  262.             : Keep going
  263.         else
  264.             exit 0
  265.         fi
  266.         TESTCONFIG=yes
  267.         ;;
  268.     esac
  269.     ;;
  270. *)    case `pwd` in
  271.     /usr/mmdf)
  272.         more <<\HERE
  273. Only the user "mmdf" may build the default configuration in
  274. /usr/mmdf.  If you wish to build a test configuration, then run
  275. this program in another directory.
  276. HERE
  277.         exit 1
  278.         ;;
  279.     *)    more <<\HERE
  280. The configuration generated will not be installed by default.
  281. The user "mmdf" will have to copy the configuration files
  282. generated here into the standard mmdf configuration heirarchy,
  283. and rebuild before this configuration will take effect.
  284.  
  285. HERE
  286.         if getyn 'Do you wish to continue' y
  287.         then
  288.             : Keep going
  289.         else
  290.             exit 0
  291.         fi
  292.         TESTCONFIG=yes
  293.         ;;
  294.     esac
  295.     ;;
  296. esac
  297.  
  298. if [ -d table ]
  299. then
  300.     : Never mind
  301. elif mkdir table >/dev/null 2>&1
  302. then
  303.     : Never mind
  304. else
  305.     echo "Could not create table directory" >&2
  306.     exit 1
  307. fi
  308.  
  309. # Confirm assumptions
  310. more <<\End_of_message
  311. In order to simplify the mail configuration files built, this program
  312. makes several assumptions about the environment in which it is being
  313. run.  If any of these assumptions are invalid for this machine, then the
  314. program will either build a correct but inefficient configuration, or a
  315. configuration containing the wrong information about how a host is to be
  316. reached.  In the latter case, you will have to edit the generated
  317. configuration files to correct the problems noted.
  318.  
  319. Here is the list of assumptions made:
  320.     - All the various communications methods which will be used for the
  321.       exchange of mail are already configured.  If this is not the
  322.       case, then exit this script and configure the communication
  323.       subsystems which will be used.  At present this script can
  324.       configure mail to be exchanged via UUCP, Micnet, and TCP/IP.
  325.  
  326.     - If mail is exchanged with a host, then only one method of
  327.       communication is used to perform the exchange.  If a host is
  328.       accessible by more than one of the protocols, then MMDF will use
  329.       the first in the following list that is applicable: TCP/IP,
  330.       MICNET, then UUCP.  If the protocol chosen in not correct for
  331.       this installation, then you will have to delete the line for the
  332.       offending host from the incorrect ".chn" files.
  333.  
  334.     - If a communications channel (UUCP, MICNET, or TCP/IP) is
  335.       configured, then mail is exchanged via that channel with every
  336.       host configured on it.  If this is not true for some host
  337.       accessible via a given channel, then you will have to delete the
  338.       information about that host from the appropriate ".chn" file, and
  339.       also from any ".dom" files that it may appear in, if it does not
  340.       receive mail at all.
  341.  
  342.     - If this host exchanges mail with two other hosts, "a" and "b"
  343.       say, then the host "a" may send mail to "b" via this host.  If
  344.       you do not want that, then this program will properly configure
  345.       the system, except for the authorization information necessary to
  346.       prevent the transfer.
  347.  
  348.     - All the hosts accessible via a particular communications method
  349.       (UUCP, for example) will be listed in the same channel.  This is
  350.       only a problem if you will be using the authorization facilities
  351.       provided by MMDF.
  352.  
  353. End_of_message
  354.  
  355. if getyn 'Do you wish to continue the configuration process at this time' y
  356. then
  357.     : Go for it
  358. else
  359.     echo "Bye."
  360.     exit 0
  361. fi
  362. #
  363. # Initialize some files
  364. #
  365. >$UUHOSTS
  366. >$SMTPHOSTS
  367. >$MICHOSTS
  368.  
  369. #
  370. # Get MMDF release information
  371. #
  372. if [ ! -f /etc/default/mail ]
  373. then
  374.     echo "There is no file /etc/default/mail, assuming level 32 MMDF."
  375.     MMDFREL=32
  376. else
  377.     . /etc/default/mail
  378.     case "$MMDFREL" in
  379.     "")    echo "There is no MMDFREL string in /etc/default/mail, assuming level 32 MMDF."
  380.         MMDFREL=32
  381.         ;;
  382.     *)    echo "This machine is running level $MMDFREL MMDF."
  383.         ;;
  384.     esac
  385. fi
  386.  
  387. #
  388. # Get host name information
  389. #
  390. # Get host and domain names
  391. if [ -x /usr/bin/hostname ]
  392. then
  393.     myname=`/usr/bin/hostname`; myname=`lowerize "$myname"`
  394.     case "$myname" in
  395.     *.*)    mydomain=`expr "$myname" : "$DOMAINPART"`
  396.         myname=`expr "$myname" : "$HOSTPART"`
  397.         ;;
  398.     *)    mydomain="UUCP"
  399.         ;;
  400.     esac
  401. else
  402.     # use uname to get hostname
  403.     myname=`uname -n`;
  404.     mydomain="UUCP"
  405. fi
  406. myFQDN="$myname.$mydomain"
  407.  
  408. case "$myname" in
  409. ""|scosysv)
  410.     echo "\nThe name of this host has not been configured yet.
  411. What will you be calling this host? \c"
  412.     myname=`getDefault scosysv`
  413.     ;;
  414. esac
  415. while [ "$myname" = scosysv ]
  416. do
  417.     echo "\nYou must specify a host name before the configuration can be completed."
  418.     if getyn "Do you wish to continue the configuration at this time?" n
  419.     then
  420.         echo "What is the name of this host? \c"
  421.         myname="`getDefault scosysv`"
  422.     else
  423.         requireConfig "The host name"
  424.     fi
  425. done
  426.  
  427. until
  428.     # confirm hostname and domainname
  429.     getyn "\nIs your fully qualified host name '$myFQDN'" y
  430. do
  431.     echo "What is the correct host name? [$myname] \c"
  432.     myname=`getDefault "$myname"`
  433.  
  434.     echo "What is the correct domain name? [$mydomain] \c"
  435.     mydomain=`getDefault "$mydomain"`
  436.  
  437.     myFQDN="$myname.$mydomain"
  438. done
  439. myname=`lowerize "$myname"`
  440. mydomain=`lowerize "$mydomain"`
  441. myFQDN=$myname.$mydomain
  442.  
  443. # Is the local host to be hidden?
  444. # We cannot hide a host if it is a member of a top level domain
  445. # e.g. we cannot hide foo.com or bar.UUCP
  446. #
  447. if expr "$mydomain" : '.*\..*' >/dev/null
  448. then
  449.     more <<END_OF_MESSAGE
  450.  
  451. At many sites, it is common for mail to be addressed as being from
  452. "person@site" instead of from "person@machine.site".  This allows people
  453. to be moved between machines internally without requiring them to notify
  454. all their external correspondents about the address change.  This
  455. configuration does, however, require a complete user alias table (see
  456. below) containing mappings from user names to the host that they actually
  457. plan to read their mail on.  If you are not sure, then you should
  458. probably answer "yes" if there are two or more machines in the domain
  459. "$mydomain", and "no" otherwise.
  460.  
  461. END_OF_MESSAGE
  462.     if getyn "Do you wish to hide '$myFQDN' behind '$mydomain'" y
  463.     then
  464.         locname="`expr $mydomain : $HOSTPART`"
  465.         locdomain="`expr $mydomain : $DOMAINPART`"
  466.         locmachine="$myname"
  467.     else
  468.         locmachine="$myname"
  469.         locname="$myname"
  470.         locdomain="$mydomain"
  471.     fi
  472. else
  473.     locmachine="$myname"
  474.     locname="$myname"
  475.     locdomain="$mydomain"
  476. fi
  477.  
  478. #
  479. # Get aliasing information
  480. #
  481.  
  482. # Get special aliasing information
  483. more <<\END_OF_MESSAGE
  484.  
  485. It is now time to get information about "mail aliases" for some special
  486. accounts.  A mail alias is a way of making mail addressed to a particular
  487. local address be delivered somewhere else.  This is commonly used to
  488. redirect mail addressed to root to an account belonging to a real person.
  489.  
  490. The three addresses that will be dealt with at this time are "root,"
  491. "mmdf," and "postmaster."  There is no account for postmaster, but it is a
  492. standard address (which must be provided by all sites) to which problems
  493. with the mail system can be reported.
  494.  
  495. END_OF_MESSAGE
  496. if getyn 'Do you wish to have mail for root redirected to a real user' y
  497. then
  498.     echo "To whom should root's mail be sent? \c"
  499.     read rootalias
  500. fi
  501.  
  502. if getyn '\nDo you wish to redirect mail addressed to mmdf' y
  503. then
  504.     mmdfalias=${rootalias:-root}
  505.     echo "To whom should mmdf's mail be sent? [$mmdfalias] \c"
  506.     mmdfalias=`getDefault $mmdfalias`
  507. fi
  508.  
  509. postmasteralias=${mmdfalias:-${rootalias:-mmdf}}
  510. echo "\nTo whom should mail addressed to postmaster be sent? [$postmasteralias] \c"
  511. postmasteralias=`getDefault $postmasteralias`
  512. # Get user aliasing information (optional)
  513. more <<ALIAS_MESSAGE
  514.  
  515. It is common on large sites to create an alias file on every machine that
  516. contains the name of the machine that a user actually reads his mail on.
  517. In this way, some one on any machine can send mail to "fred" and know that
  518. it will be delivered to the correct computer for fred to read it.  If you
  519. want to have this arrangement, see the information about aliases in the
  520. chapter discussing MMDF configuration in your system administrator's
  521. guide.  There will be a fully configured (but empty) file called
  522. "alias.user" in the mmdf table directory to hold this information.
  523.  
  524. Note:  If you are converting from XENIX to UNIX, then there is a utility
  525. to convert a XENIX style mail alias file into the correct format for MMDF.
  526. See the subsection of "Setting up Electronic Mail" entitled "Converting an
  527. Alias file."
  528.  
  529. ALIAS_MESSAGE
  530.  
  531. # Check communications configurations
  532. # UUCP
  533. if [ ! -x /usr/bin/uuname ]
  534. then
  535.     echo "UUCP not installed, skipping ..."
  536. elif getyn "Are you going to be using UUCP for mail" y
  537. then
  538.     haveuucp=yes
  539.     uuname=`uuname -l`
  540.     until getyn "\nIs this host known as '$uuname' for UUCP" y
  541.     do
  542.         echo "What is this host's UUCP name? [$uuname] "
  543.         uuname="`getDefault $uuname`"
  544.     done
  545.  
  546.     uuname | sort -u -o $UUHOSTS
  547.     if [ -s $UUHOSTS ]
  548.     then
  549.         if echo "scolon\nsosco" | cmp -s - $UUHOSTS
  550.         then
  551.             requireConfig UUCP
  552.         elif egrep "(scolon|sosco)" $UUHOSTS >/dev/null 2>&1
  553.         then
  554.             ed - $UUHOSTS <<-END_OF_SCRIPT
  555.                 g/^scolon$/d
  556.                 g/^sosco$/d
  557.                 w
  558.                 q
  559.                 END_OF_SCRIPT
  560.         fi
  561.     else
  562.         requireConfig UUCP
  563.     fi
  564.     #
  565.     # Get domain information related to the uucp hosts.
  566.     #
  567.     more <<DOMAIN_MESSAGE
  568.     
  569. Because UUCP does not maintain information about domain names, it will be
  570. necessary for you to provide the domain names of any of the hosts with
  571. which you communicate via UUCP.
  572.  
  573. DOMAIN_MESSAGE
  574.     if getyn "Do any of your UUCP hosts have full domain names" n
  575.     then 
  576.         getDomainNames UUCP $UUHOSTS
  577.     fi
  578.     generateDefaultDomains $UUHOSTS .uucp
  579. fi # using uucp
  580.  
  581.  
  582. # MICNET
  583. if [ ! -s /usr/lib/mail/top ]
  584. then
  585.     echo "\nMicnet not configured, skipping ...\n"
  586. elif getyn "\nAre you going to be using MICNET for mail" y
  587. then
  588.     havemicnet=yes
  589.     awk '/^[^#]/ {
  590.             if (NF == 5) {
  591.                 print $1
  592.                 print $3
  593.             }
  594.     }' /usr/lib/mail/top | sort -u | grep -v $myname >$MICHOSTS
  595.  
  596.     if getyn "Are all the MICNET hosts in the domain $mydomain" y
  597.     then
  598.         : This is what we are expecting
  599.     else
  600.         getDomainNames MICNET $MICHOSTS $mydomain
  601.     fi
  602.     generateDefaultDomains $MICHOSTS $mydomain
  603. fi
  604.  
  605.  
  606. # TCP/IP
  607. if [ ! -f /etc/inetd ]
  608. then
  609.     echo "\nTCP/IP not installed, skipping...\n"
  610. elif getyn "\nAre you going to be using SMTP for mail" y
  611. then
  612.     havesmtp=yes
  613.     if [ -f /etc/resolv.conf -o -f /etc/named.boot ]
  614.     then
  615.         # Running the name server
  616.         case "$MMDFREL" in
  617.         *NS)    echo "A domain name server is running, mail will be configured to use it."
  618.             usenameserver=yes
  619.             qnameserver=yes
  620.             >$SMTPHOSTS
  621.             ;;
  622.         *)    more <<END_OF_MSG
  623.  
  624. A domain name server is configured on this system, but MMDF cannot get
  625. configuration information from it directly.  Information about the local
  626. domain will be extracted from the name server and configured into MMDF, but
  627. any changes to the name server database will have to be reflected in the
  628. MMDF configuration files.
  629.  
  630. Getting SMTP configuration information...
  631. END_OF_MSG
  632.             qnameserver=yes
  633.             buildSMTPfromNS >$SMTPHOSTS;
  634.             ;;
  635.         esac
  636.     elif expr "$MMDFREL" : '.*NS$' >/dev/null &&
  637.         getyn 'The name server is not currently configured on this machine.
  638. Do you plan to configure a name server on the local network' n
  639.     then
  640.         requireConfig "name server"
  641.     else
  642.         # use /etc/hosts
  643.         tr '[A-Z]' '[a-z]' </etc/hosts \
  644.         | awk '/^#/ || /^[ \t]*$/ || /^127/ {next}
  645.             {
  646.                 if ($2 !~ /\./) {
  647.                     print $2, $2 "." mydomain
  648.                     $2 = $2 "." mydomain
  649.                 } else
  650.                     print $2, $2
  651.  
  652.                 for (i = 3; i <= NF; ++i) {
  653.                     if ($i != $2)
  654.                         print $i, $2
  655.                 }
  656.             }' mydomain=$mydomain >$SMTPHOSTS
  657.     fi
  658. fi
  659.  
  660.  
  661. #
  662. # Only ask for a smart host if we can talk to it.
  663. #
  664. if [ $havemicnet = yes -o $haveuucp = yes -o $havesmtp = yes ]
  665. then
  666.     more <<END_OF_SCRIPT
  667.  
  668. Many sites do not have complete information about the entire mail network,
  669. but rely on another "smarter" host to determine the correct route that
  670. mail messages should follow to reach their destinations.  Any mail that
  671. the local machine is incapable of correctly handling is passed to the
  672. smart host for further processing.  In MMDF, this is called the "badhost"
  673. channel.
  674.  
  675. END_OF_SCRIPT
  676.     if getyn "Do you have such a \"smart\" host" y
  677.     then
  678.         until
  679.             until
  680.                 echo "What is its name? (q if you have changed your mind) \c"
  681.                 read smarthost
  682.                 case "$smarthost" in
  683.                 "")    false
  684.                     ;;
  685.                 *)    true
  686.                     ;;
  687.                 esac
  688.             do
  689.                 echo "\nPlease enter a name!"
  690.             done
  691.             case "$smarthost" in
  692.             q)    break
  693.                 ;;
  694.             esac
  695.     
  696.             ([ "$usenameserver" = yes -o "$qnameserver" = yes ] &&
  697.                 $HOST $smarthost >/dev/null 2>&1;) ||
  698.             grep -s "^$smarthost " $ALLHOSTS >/dev/null 2>&1 ||
  699.             grep -s " $smarthost$" $ALLHOSTS >/dev/null 2>&1
  700.         do
  701.             echo "This machine does not communicate with $smarthost."
  702.             echo "Please enter the name of a machine directly connected to $myname."
  703.         done
  704.         case "$smarthost" in
  705.         q)    : do nothing
  706.             ;;
  707.         *)
  708.             badhosthost="`getFQDN $smarthost`"
  709.             if {
  710.                 [ "$usenameserver" = yes -o "$qnameserver" = yes ] &&
  711.                  $HOST $smarthost >/dev/null 2>&1
  712.             } || grep -s $smarthost $SMTPHOSTS >/dev/null 2>&1
  713.             then
  714.                 badhostpgm=smtp
  715.                 badhostconf="$myFQDN"
  716.                 badhosttable=smtpchn
  717.             elif grep -s $smarthost $UUHOSTS >/dev/null 2>&1
  718.             then
  719.                 badhostpgm=uucp
  720.                 badhosttable=uuchn
  721.             elif grep -s $smarthost $MICHOSTS >/dev/null 2>&1
  722.             then
  723.                 badhostpgm=micnet
  724.                 badhosttable=mnchn
  725.             fi
  726.         esac
  727.     fi
  728.  
  729.     #
  730.     # Now ask about badusers
  731.     #
  732.     more <<END_OF_SCRIPT
  733.  
  734. Another option, which is often used on large sites is to have a central
  735. machine which contains complete knowledge about all the users on the site,
  736. and only maintaining local lists on each machine.  MMDF provides the
  737. facility to forward mail containing unrecognised local addresses to a
  738. smarter host which will have a complete user data base (via the "baduser"
  739. channel).
  740.  
  741. END_OF_SCRIPT
  742.     if getyn "Do you have such a \"smart\" host" y
  743.     then
  744.         until
  745.             echo "What is its name? (q if you have changed your mind) [$badhosthost] \c"
  746.             smarthost=`getDefault $badhosthost`
  747.             case "$smarthost" in
  748.             q)    break
  749.                 ;;
  750.             esac
  751.  
  752.             ([ "$usenameserver" = yes -o "$qnameserver" = yes ] && $HOST $smarthost >/dev/null 2>&1;) ||
  753.             grep -s "^$smarthost " $ALLHOSTS >/dev/null 2>&1 ||
  754.             grep -s " $smarthost$" $ALLHOSTS >/dev/null 2>&1
  755.             
  756.         do
  757.             echo "This machine does not communicate with $smarthost."
  758.             echo "Please enter the name of a machine directly connected to $myname."
  759.         done
  760.         case "$smarthost" in
  761.         q)    : do nothing
  762.             ;;
  763.         *)
  764.             baduserhost="`getFQDN $smarthost`"
  765.             if {
  766.                 [ "$usenameserver" = yes -o "$qnameserver" = yes ] &&
  767.                  $HOST $smarthost >/dev/null 2>&1
  768.             } || grep -s $smarthost $SMTPHOSTS >/dev/null 2>&1
  769.             then
  770.                 baduserpgm=smtp
  771.                 baduserconf="$myFQDN"
  772.                 badusertable=smtpchn
  773.             elif grep -s $smarthost $UUHOSTS >/dev/null 2>&1
  774.             then
  775.                 baduserpgm=uucp
  776.                 badusertable=uuchn
  777.             elif grep -s $smarthost $MICHOSTS >/dev/null 2>&1
  778.             then
  779.                 baduserpgm=micnet
  780.                 badusertable=mnchn
  781.             fi
  782.         esac
  783.     fi
  784. fi
  785.  
  786. case $MMDFREL in
  787. 43*)
  788.     DmnPartialFlags=', flags=partial'
  789.     DmnRouteFlags=', flags=route'
  790.     ;;
  791. *NS)
  792.     DmnPartialFlags=', flags=partial'
  793.     ;;
  794. esac
  795.  
  796. #
  797. # Now build all the files necessary
  798. #
  799.  
  800. saveFile $TAILORFILE
  801. echo "Creating the mmdftailor file: header, host name info\c"
  802. cat >$TAILORFILE <<END_OF_TAILOR
  803. ;
  804. ;    mmdftailor (`date '+%a, %d %h %y %T'`)
  805. ;
  806. ; First, we define the local domain and system name.  The default
  807. ; domain is UUCP.  If our organization only has one machine, we
  808. ; may just name it as in machine.UUCP, for instance.  Otherwise,
  809. ; we might have a number of machines, and have the machine name
  810. ; be below an organization name as in machine.COMpany.UUCP.  Of
  811. ; course, if we have a registered domain name, we use that instead
  812. ; of the default (pseudo) domain UUCP.  UUname is used only for
  813. ; the uucp channel, and is the short uucp name that we use.
  814.  
  815. MLDOMAIN $locdomain
  816. MLNAME $locname
  817. END_OF_TAILOR
  818.  
  819. if [ ! -z "$locmachine" ]
  820. then
  821.     echo "MLOCMACHINE $locmachine" >>$TAILORFILE
  822. fi
  823.  
  824. if [ -s $UUHOSTS ]
  825. then
  826.     echo "UUname $uuname" >>$TAILORFILE
  827. fi
  828.  
  829. echo ", support address, alias tables, local domain and channel\c"
  830. cat >>$TAILORFILE <<END_OF_TAILOR
  831.  
  832. ; MSUPPORT is the address to which problem notifications concerning
  833. ; the delivery of mail are sent.  It _must_ be a valid address.
  834.  
  835. MSUPPORT postmaster
  836.  
  837. ;
  838. ; Alias configuration
  839. ;
  840. MTBL name=alias,    file="$ALIAS",    show="Administrative aliases"
  841. MTBL name=lalias,    file="$LALIAS",    show="Mailing list aliases"
  842. MTBL name=auser,    file="$AUSER",    show="General user aliases"
  843.  
  844. ALIAS    table=alias,    nobypass,    trusted
  845. ALIAS    table=lalias,    nobypass
  846. ALIAS    table=auser
  847.  
  848.  
  849. ;
  850. ; Local mail configuration info
  851. ;
  852. MTBL name=local,    file="$LOCAL",    show="Local Host Aliases"
  853. MTBL name=locdom,    file="$LOCDOM",    show="Local Domain"
  854.  
  855. MCHN    local, show="Local Delivery", ap=822, mod=imm
  856. MDMN    "$mydomain", show="Local domain", table=locdom
  857.  
  858. ;
  859. ; special list processing configuration info
  860. ;
  861. MTBL    list,           file="list.chn",        show="List Channel"
  862. MCHN    list, show="List Processing", ap=same, mod=imm,
  863.     host="$myFQDN"
  864. END_OF_TAILOR
  865.  
  866. if [ -s $SMTPHOSTS -o $usenameserver = yes ]
  867. then
  868.     echo ", SMTP\c"
  869.     generatedDomainLine=yes
  870.     cat >>$TAILORFILE <<END_OF_TAILOR
  871.  
  872. ;
  873. ; SMTP Configuration info
  874. ;
  875. END_OF_TAILOR
  876.     case "$usenameserver" in
  877.     no)
  878.         cat >>$TAILORFILE <<END_OF_TAILOR
  879. MTBL    smtpchn,    file=$SMTPCHN,        show="SCO SMTP Channel"
  880. MCHN    smtp, show="SCO SMTP Delivery", ap=822, tbl=smtpchn, mod=imm,
  881.     confstr="$myFQDN"
  882.  
  883. ;
  884. ; The local domain table
  885. ;
  886. MTBL domain, file=$DOMAINDOM, show="Local Ethernet"$DmnPartialFlags
  887. MDMN "$mydomain", show="Local Ethernet", table=domain
  888. END_OF_TAILOR
  889.         ;;
  890.     yes)
  891.         cat >>$TAILORFILE <<END_OF_TAILOR
  892. ;
  893. ; The local domain table
  894. ;
  895. MTBL domain, file=$DOMAINDOM, show="Local Ethernet"$DmnPartialFlags
  896. MDMN "$mydomain", show="Local Ethernet", table=domain
  897.  
  898. MTBL    smtpchn,    flags=ns,        show="SCO SMTP Channel",
  899.     flags=channel
  900. MTBL    smtpdom,    flags=ns,        show="Local Ethernet",
  901.     flags=domain$DmnPartialFlags
  902.  
  903. MCHN    smtp, show="SCO SMTP Delivery", ap=822, tbl=smtpchn, mod=imm,
  904.     confstr="$myFQDN"
  905. ; We need, among other things, the delay channel
  906. MCHN    delay, show="Name server Delay Channel", ap=same, tbl=smtpchn
  907. MDMN    "$mydomain", show="Local Ethernet", table=smtpdom
  908. END_OF_TAILOR
  909.         ;;
  910.     esac
  911. fi
  912.  
  913. case "$havemicnet" in
  914. yes)
  915.     echo ", MICNET\c"
  916.     case "$generatedDomainLine" in
  917.     no)    generatedDomainLine=yes
  918.         cat >>$TAILORFILE <<END_OF_TAILOR
  919. ;
  920. ; The local domain table
  921. ;
  922. MTBL domain, file=$DOMAINDOM, show="Local Domain"$DmnPartialFlags
  923. MDMN "$mydomain", show="Local Domain", table=domain
  924. END_OF_TAILOR
  925.         ;;
  926.     esac
  927.  
  928.         cat >>$TAILORFILE <<END_OF_TAILOR
  929.  
  930. ;
  931. ; MICNET Configuration info
  932. ;
  933. MTBL    mnchn,          file="micnet.chn",        show="SCO Micnet Channel"
  934. MCHN    micnet, show="SCO MICNET Delivery", tbl=mnchn, ap=same
  935. END_OF_TAILOR
  936.     ;;
  937. esac
  938.  
  939. case "$haveuucp" in
  940. yes)
  941.     echo ", UUCP\c"
  942.     case "$generatedDomainLine" in
  943.     no)    generatedDomainLine=yes
  944.         cat >>$TAILORFILE <<END_OF_TAILOR
  945. ;
  946. ; The local Domain table
  947. ;
  948. MTBL domain, file=$DOMAINDOM, show="Local Domain"$DmnPartialFlags
  949. MDMN    "$mydomain", show="Local Domain", table=domain
  950. END_OF_TAILOR
  951.         ;;
  952.     esac
  953.     cat >>$TAILORFILE <<END_OF_TAILOR
  954.  
  955. ;
  956. ; UUCP Configuration info
  957. ;
  958. MTBL uuchn, file="uucp.chn", show="SCO UUCP Channel"
  959. MTBL uudom, file="uucp.dom", show="SCO UUCP Domain"$DmnRouteFlags$DmnPartialFlags
  960.  
  961. MCHN uucp, show="SCO UUCP Delivery", tbl=uuchn, ap=same
  962. MDMN "UUCP", show="UUCP Domain", table=uudom
  963. END_OF_TAILOR
  964.     ;;
  965. esac
  966.  
  967. if [ ! -z "$badhostpgm" ]
  968. then
  969.     echo ", badhosts\c"
  970.     cat >>$TAILORFILE <<END_OF_TAILOR
  971.  
  972. ;
  973. ; The badhosts channel
  974. ;
  975. MCHN badhosts, show="Last-Chance Routing", pgm=$badhostpgm, tbl=$badhosttable, ap=822,
  976.      host="$badhosthost"${badhostconf:+, confstr=$badhostconf}
  977. END_OF_TAILOR
  978. fi
  979.  
  980. if [ ! -z "$baduserpgm" ]
  981. then
  982.     echo ", badusers\c"
  983.     cat >>$TAILORFILE <<END_OF_TAILOR
  984.  
  985. ;
  986. ; The baduser channel
  987. ;
  988. MCHN badusers, show="Last-Chance Routing", pgm=$baduserpgm, tbl=$badusertable, ap=822,
  989.      host="$baduserhost"${baduserconf:+, confstr=$baduserconf}
  990. END_OF_TAILOR
  991. fi
  992.  
  993. echo ", root"
  994. cat >>$TAILORFILE <<END_OF_TAILOR
  995. ;
  996. ; The root domain table.
  997. ;
  998. MTBL rootdom, file="root.dom", show="Root Domain"$DmnRouteFlags
  999. MDMN "", show="Root Domain", table=rootdom
  1000.  
  1001. ;
  1002. ;  Logging levels
  1003. ;
  1004. MMSGLOG level=FAT
  1005. MCHANLOG level=FAT
  1006.  
  1007. ;
  1008. ; Style of mailbox locking to use.  Options are "xenix" for Xenix
  1009. ; /tmp/*.mlk lock files, "v7" for the old *.lck lock files, "advisory"
  1010. ; for OS advisory file locking, or "all" for all locking styles.
  1011. ; Multiple lock styles may be specified.
  1012. ;
  1013. MLCKTYPE advisory
  1014. END_OF_TAILOR
  1015.  
  1016. echo "\nBuilding the alias tables (mostly empty)"
  1017. saveFile $TABLEDIR/$ALIAS
  1018. cat >$TABLEDIR/$ALIAS <<END_OF_ALIAS
  1019. #
  1020. #    $ALIAS: Administrative aliases (`date '+%a, %d %h %y %T'`)
  1021. #
  1022.  
  1023. # Following alias is required  by the mail protocol, RFC 822
  1024. postmaster: ${postmasteralias}
  1025.  
  1026. END_OF_ALIAS
  1027. if [ ! -z "$rootalias" -a "$rootalias" != root ]
  1028. then
  1029.     echo "root: $rootalias" >> $TABLEDIR/$ALIAS
  1030. fi
  1031.  
  1032. if [ ! -z "$mmdfalias" -a "$mmdfalias" != mmdf ]
  1033. then
  1034.     echo "mmdf: $mmdfalias" >>$TABLEDIR/$ALIAS
  1035. fi
  1036.  
  1037. if [ -f $TABLEDIR/$LALIAS ]
  1038. then
  1039.     echo "A Mailing list alias table ($LALIAS) already exists, skipping"
  1040. else
  1041.     saveFile $TABLEDIR/$LALIAS
  1042.     cat >$TABLEDIR/$LALIAS << END_OF_ALIAS
  1043. #
  1044. #    $LALIAS: Mailing list aliases (`date '+%a, %d %h %y %T'`)
  1045. #
  1046.  
  1047. END_OF_ALIAS
  1048. fi
  1049.  
  1050.  
  1051. if [ -f $TABLEDIR/$AUSER ]
  1052. then
  1053.     echo "A general user alias table ($AUSER) already exists, skipping"
  1054. else
  1055.     cat >$TABLEDIR/$AUSER <<END_OF_ALIAS
  1056. #
  1057. #    $AUSER: General user aliases (`date '+%a, %d %h %y %T'`)
  1058. #
  1059.  
  1060. END_OF_ALIAS
  1061. fi
  1062.  
  1063. case $user in
  1064. mmdf)
  1065.     makeDirectory $SPOOLDIR/lock/home/tmp $SPOOLDIR/lock/home/addr \
  1066.         $SPOOLDIR/lock/home/msg >/dev/null 2>&1
  1067.     chgrp mmdf $SPOOLDIR/lock
  1068.     chmod 750 $SPOOLDIR/lock
  1069.     chmod 777 $SPOOLDIR/lock/home
  1070.     ;;
  1071. esac
  1072.     echo "\nBuilding channel files"
  1073. echo "local\c"
  1074. makeDirectory $SPOOLDIR/lock/home/q.local >/dev/null 2>&1
  1075. saveFile $TABLEDIR/$LOCAL
  1076. cat >$TABLEDIR/$LOCAL <<END
  1077.  
  1078. #
  1079. #    $LOCAL: Local channel table (`date '+%a, %d %h %y %T'`)
  1080. #
  1081.  
  1082. $locmachine: $locmachine
  1083. $locname.$locdomain: $locmachine
  1084. END
  1085.  
  1086. if [ "$locmachine" != "$locname" ]
  1087. then
  1088.     # Host hiding
  1089.     echo "$locmachine.$locname.$locdomain: $locmachine" >>$TABLEDIR/$LOCAL
  1090. fi
  1091.  
  1092. echo ", list\c"
  1093. makeDirectory $SPOOLDIR/lock/home/q.list >/dev/null 2>&1
  1094. saveFile $TABLEDIR/$LIST
  1095. cat >$TABLEDIR/$LIST <<END
  1096.  
  1097. #
  1098. #    $LIST: List channel table (`date '+%a, %d %h %y %T'`)
  1099. #
  1100.  
  1101. list-processor: list-processor
  1102. END
  1103.  
  1104. if [ "$havesmtp" = yes ]
  1105. then
  1106.     makeDirectory $SPOOLDIR/lock/home/q.smtp >/dev/null 2>&1
  1107.  
  1108.     case "$usenameserver" in
  1109.     yes)
  1110.         # we need to build the delay channel queue directory
  1111.         makeDirectory $SPOOLDIR/lock/home/q.delay
  1112.         ;;
  1113.     no)
  1114.         saveFile $TABLEDIR/$SMTPCHN
  1115.         echo ", SMTP\c"
  1116.         cat >$TABLEDIR/$SMTPCHN <<END_OF_FILE
  1117. #
  1118. #    $SMTPCHN: SMTP channel table (`date '+%a, %d %h %y %T'`)
  1119. #
  1120.  
  1121. END_OF_FILE
  1122.  
  1123.         case "$qnameserver" in
  1124.         yes)
  1125.             $HOST -t a -l $mydomain |
  1126.             sed -e '/ NS /d' \
  1127.                 -e '/127\.0\.0\.1/d' \
  1128.                 -e 's/ has address /: /' >> $TABLEDIR/$SMTPCHN
  1129.             ;;
  1130.         *)
  1131.             awk '/^#/ || /^[ \t]*$/    || /^127/ {next}
  1132.                 {
  1133.                     if ($2 !~ /\./) {
  1134.                         print $2 "." mydomain ": " $1
  1135.                     } else
  1136.                         print $2 ": " $1
  1137.                 }' mydomain=$mydomain /etc/hosts >>$TABLEDIR/$SMTPCHN
  1138.             ;;
  1139.         esac
  1140.     esac
  1141. fi
  1142.  
  1143. if [ "$havemicnet" = yes ]
  1144. then
  1145.     makeDirectory $SPOOLDIR/lock/home/q.micnet >/dev/null 2>&1
  1146.     echo ", MICNET\c"
  1147.     saveFile $TABLEDIR/$MNCHN
  1148.     cat >$TABLEDIR/$MNCHN <<END_OF_FILE
  1149. #
  1150. #    $MNCHN: Micnet channel table (`date '+%a, %d %h %y %T'`)
  1151. #
  1152.  
  1153. END_OF_FILE
  1154.     awk '{printf("%s: %s:%%s\n", $2, $1)}' $MICHOSTS >>$TABLEDIR/$MNCHN
  1155. fi
  1156.  
  1157. if [ "$haveuucp" = yes ]
  1158. then
  1159.     makeDirectory $SPOOLDIR/lock/home/q.uucp >/dev/null 2>&1
  1160.     echo ", UUCP\c"
  1161.     saveFile $TABLEDIR/$UUCHN
  1162.     cat >$TABLEDIR/$UUCHN <<END_OF_FILE
  1163. #
  1164. #    $UUCHN: UUCP channel table (`date '+%a, %d %h %y %T'`)
  1165. #
  1166.  
  1167. END_OF_FILE
  1168.     # Chuck the mock domain .UUCP (it's only used to pick things for the
  1169.     # domain table, and is removed there) and generate
  1170.     # foo.dom.ain: foo!%s for each line in $UUHOSTS
  1171.     sed -n -e '/\.uucp$/s///' \
  1172.         -e 's/^\([^ ]*\) \(.*\)$/\2: \1!%s/p' $UUHOSTS >>$TABLEDIR/$UUCHN
  1173. fi
  1174.  
  1175. echo ", badusers\c"
  1176. if [ ! -z "$baduserpgm" ]
  1177. then
  1178.     makeDirectory $SPOOLDIR/lock/home/q.badusers >/dev/null 2>&1
  1179. fi
  1180.  
  1181. echo ", badhosts\c"
  1182. if [ ! -z "$badhostpgm" ]
  1183. then
  1184.     makeDirectory $SPOOLDIR/lock/home/q.badhosts >/dev/null 2>&1
  1185. fi
  1186. case $user in
  1187. mmdf)    chmod 777 $SPOOLDIR/lock/home/* >/dev/null 2>&1
  1188.     ;;
  1189. esac
  1190.  
  1191. echo "\n\nBuilding the domain tables"
  1192. echo "local\c"
  1193. saveFile $TABLEDIR/$LOCDOM
  1194. cat >$TABLEDIR/$LOCDOM <<END
  1195. #
  1196. #    $LOCDOM: Local domain table (`date '+%a, %d %h %y %T'`)
  1197. #
  1198.  
  1199. $locmachine: $locname.$locdomain
  1200. END
  1201.  
  1202. #
  1203. # We only need to generate domain.dom if it's used in mmdftailor
  1204. case "$generatedDomainLine" in
  1205. yes)
  1206.     echo ", $mydomain\c"
  1207.     saveFile $TABLEDIR/$DOMAINDOM
  1208.     cat >$TABLEDIR/$DOMAINDOM <<END_OF_FILE
  1209. #
  1210. #    $DOMAINDOM: $mydomain domain table (`date '+%a, %d %h %y %T'`)
  1211. #
  1212.  
  1213. END_OF_FILE
  1214.     sed -e "/\.$mydomain$/!d" \
  1215.         -e 's/ /: /' $ALLHOSTS >>$TABLEDIR/$DOMAINDOM
  1216.     ;;
  1217. esac
  1218.  
  1219. case "$haveuucp" in
  1220. yes)
  1221.     echo ", UUCP\c"
  1222.     saveFile $TABLEDIR/$UUDOM
  1223.     cat >$TABLEDIR/$UUDOM <<END_OF_FILE
  1224. #
  1225. #    $UUDOM: UUCP domain table (`date '+%a, %d %h %y %T'`)
  1226. #
  1227.  
  1228. END_OF_FILE
  1229.     awk 'BEGIN {
  1230.             gsub(/\./, "\\.", mydomain)
  1231.             mydompat="\\." mydomain "$"
  1232.         }
  1233.  
  1234.         {
  1235.             if ($2 ~ mydompat)
  1236.                 next
  1237.             if (($2 ~ /\.uucp$/) || ($2 !~ /\./)) {
  1238.                 sub(/\.uucp$/, "", $2)
  1239.                 printf("%s: %s\n", $1, $2)
  1240.             }
  1241.         }' mydomain="$mydomain" $ALLHOSTS >>$TABLEDIR/$UUDOM
  1242.     ;;
  1243. esac
  1244.  
  1245.  
  1246. echo ", root\c"
  1247.  
  1248. saveFile $TABLEDIR/$ROOTDOM
  1249. cat >$TABLEDIR/$ROOTDOM <<END
  1250. #
  1251. #    $ROOTDOM: Root domain table (`date '+%a, %d %h %y %T'`)
  1252. #
  1253.  
  1254. list-processor: list-processor
  1255.  
  1256. $locmachine: $locname.$locdomain
  1257. END
  1258.  
  1259. if [ $locname != $locmachine ]
  1260. then
  1261.     # Host hiding is in effect
  1262.     echo "$locname.$locdomain: $locname.$locdomain" >>$TABLEDIR/$ROOTDOM
  1263. fi
  1264.  
  1265. # Delete hosts which do not have domain names, or have the domain name '.uucp'
  1266. #    (they are in uucp.dom)
  1267. # Delete hosts which are in my domain (they are in 'smtp.dom')
  1268. # generate three lines for each of the remaining lines
  1269. # foo foo.dom.ain maps into
  1270. #
  1271. #    foo: foo.dom.ain
  1272. #    foo.dom.ain: foo.dom.ain
  1273. #    dom.ain: foo.dom.ain
  1274. sed -e '/ [^.]*$/d' \
  1275.     -e '/\.uucp$/d' \
  1276.     -e "/\.`echo "$mydomain" | sed -e 's/\./\\./g'`$/d" \
  1277.     -e h \
  1278.     -e 's/.*//' -e p \
  1279.     -e g -e 's/ /: /' -e p \
  1280.     -e 's/.* \(.*\)/\1: \1/' -e p \
  1281.     -e g -e 's/^.* \([^.]*\.\)\(.*\)$/\2: \1\2/' $ALLHOSTS >>$TABLEDIR/$ROOTDOM
  1282.  
  1283. echo "\ndone"
  1284.  
  1285. case `pwd` in
  1286. /usr/mmdf)
  1287.     echo "building the database"
  1288.     /usr/mmdf/table/dbmbuild -n -v
  1289.     ;;
  1290. *)
  1291.     echo "You will have to install the database and run dbmbuild"
  1292.     ;;
  1293. esac
  1294. echo ""
  1295.  
  1296. more <<END_OF_CONFIG
  1297.  
  1298. The configuration is now complete.  If your site does not completely
  1299. conform to the assumptions listed at the beginning of the program, then
  1300. you may wish to look over the files that have been built to ensure that
  1301. they are correct.  This script also created a new "alias.ali" file, and
  1302. saved the old one in "alias.ali-".  If you had any aliases in alias.ali
  1303. (besides mmdf, root, and postmaster), then you should add them to the new
  1304. alias.ali, and rerun table/dbmbuild to rebuild the database.  You may
  1305. also have to create an alias.user file, if you decided to hide the names
  1306. of you local machines behind your domain name.
  1307.  
  1308. There are several configuration options available for MMDF (especially
  1309. related to logging).  These options are all documented in the
  1310. mmdftailor(F) man page.  In particular, if you are switching from a
  1311. sendmail-based system, then you may want to change the MMSGLOG parameter
  1312. (default is "FAT" - log fatal errors only) to "FST" in order to get the
  1313. equivalent of the mqueue/syslog logging.
  1314.  
  1315. Note: This new configuration will have no effect on any deliver daemons
  1316. that are currently running.  You will have to kill them and restart them
  1317. by hand.  As well, you should make sure that there are deliver daemons
  1318. watching all the channels that you have configured by modifying the
  1319. /etc/rc scripts appropriately.
  1320.  
  1321. END_OF_CONFIG
  1322. exit 0
  1323.